package com.snowwolf.trade.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: snowwolf
 * @description: 随机获取
 * @date: Create in 2019/2/25 18:46
 * @modified by:
 * @versions：0.1.0
 */
@Configuration
@RibbonClient(name = "trade",configuration = RuleConfig.class)
public class RuleConfig {
    @Bean
    public IRule getRule(){
        return new RandomRule();
    }
}

